home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / docs / mags / woa4.lha / WORLD4 / Editorial / Regulars / Quick-Guide < prev   
Encoding:
Text File  |  1999-08-06  |  3.4 KB  |  92 lines

  1. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>WOA
  2.  
  3. Quick Guide to...
  4. HTML Tables
  5.  
  6. The previous writer of these parts has decided to give up. More for
  7. me to do... hmmmm.... aren't I lucky... :) Anyway, someone suggested
  8. HTML tables as a topic for this, and since I've just got the hang
  9. of legal HTML tables (as opposed to illegal ones) myself, I think I
  10. may aswell give you the benefit of my new-found experience.
  11.  
  12. Tables in HTML start off with a TABLE tag. Easy. There are several
  13. arguments you can give in this tag...
  14.  
  15.    WIDTH=       This is the width of the table overall. You can specify
  16.                 this in percent or pixels. eg, WIDTH=90% or WIDTH=150
  17.  
  18.    HEIGHT=      This is the height of the table. Specify using the
  19.                 same syntax as WIDTH
  20.  
  21.    BORDER=      The width of the table border in pixels. eg, BORDER=0
  22.  
  23.    CELLPADDING= The size of the padding around a cell, in pixels.
  24.  
  25.    CELLSPACING= The space between a cell of the table.
  26.  
  27. So, that's the table started off. If you're going to be using width
  28. definitions in the cells, then you need to define a width of the overall
  29. table of things may start to look strange.
  30.  
  31. For your table to be legal, you need to start off the first row of
  32. cells. You do this using the <TR> (Table Row) tag. This includes some
  33. parameters. WIDTH and HEIGHT can be used. Others are available, but
  34. can be covered later if anyone asks.
  35.  
  36. <TABLE WIDTH=500 HEIGHT=500 BORDER=0>
  37.    <TR>
  38.  
  39. That's what you have so far. Notice I've started indenting the code.
  40. This is just for ease of reading, and is not compulsary. You now
  41. need to define a cell. You do this using the <TD> tag. This allows
  42. the width and height parameters, as well as these:
  43.  
  44.    COLSPAN=    This is the number of columns that the cell you are
  45.                creating will span across the top of.
  46.  
  47.    +------------+---+
  48.    |     1      | 2 |
  49.    +---+----+---+---+
  50.    | 3 | 4  | 5 | 6 |
  51.    +---+----+---+---+
  52.  
  53. Cell number 1 spans 3 columns (goes over the top of 3 columns that is).
  54. The HTML code for the above table would look something like this:
  55.  
  56. <TABLE BORDER=0>              Start the table
  57.    <TR>                       Start the first row
  58.       <TD COLSPAN=3>          Start the first cell
  59.          This is cell 1
  60.       </TD>                   End the first cell
  61.       <TD COLSPAN=1>          Start the second cell
  62.          This is cell 2
  63.       </TD>                   End the second cell
  64.    </TR>                      End the first row
  65.    <TR>                       Start the second row
  66.       <TD COLSPAN=1>          Start of third cell
  67.          This is cell 3
  68.       </TD>                   End of third cell
  69.       <TD COLSPAN=1>          Start of fourth cell
  70.          This is cell 4
  71.       </TD>                   End of fourth cell
  72.       <TD COLSPAN=1>          Start of fifth cell
  73.          This is cell 5
  74.       </TD>                   End of fifth cell
  75.       <TD COLSPAN=1>          Start of sixth cell
  76.          This is cell 6
  77.       </TD>                   End of sixth cell
  78.    </TR>                      End of second row
  79. </TABLE>                      End of table
  80.  
  81. You can also have a BGCOLOR argument in the TD tag which allows you
  82. to specify a colour for the cell using either normal HTML colour
  83. definitions such as 'Black', 'Green', etc or Hex values such as
  84. '#00ff00'. Just remember to close all your tags and it's legal! (Well
  85. nearly :)
  86.  
  87. >>W<<<<<
  88. >>>O<<<< Neil
  89. >>>>A<<<
  90.  
  91.